﻿<!--{eval $_TPL['titles'] = array($blog['subject'], '日志');}-->
<!--{eval $friendsname = array(1 => '仅好友可见',2 => '指定好友可见',3 => '仅自己可见',4 => '凭密码可见');}-->
<!--{template header}-->

<!--{if $space[self]}-->
<h2 class="title"><img src="image/app/blog.gif" />日志</h2>
<div class="tabs_header">
	<ul class="tabs">
		<!--{if $space[friendnum]}--><li$actives[we]><a href="space.php?uid=$space[uid]&do=$do&view=we"><span>好友最新日志</span></a></li><!--{/if}-->
		<li class="active"><a href="space.php?uid=$space[uid]&do=$do&view=me"><span>我的日志</span></a></li>
		<li><a href="space.php?uid=$space[uid]&do=$do&view=click"><span>我踩过的日志</span></a></li>
		<li><a href="space.php?uid=$space[uid]&do=$do&view=all"><span>大家的日志</span></a></li>
		<li class="null"><a href="cp.php?ac=blog">发表新日志</a></li>
	</ul>
	<!--{if $_SGLOBAL[refer]}-->
	<div class="r_option">
		<a  href="$_SGLOBAL[refer]">&laquo; 返回上一页</a>
	</div>
	<!--{/if}-->
</div>
<!--{else}-->
<!--{eval
	$_TPL['spacetitle'] = "日志";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=$do&view=me\">TA的所有日志</a>";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=blog&id=$blog[blogid]\">查看日志</a>";
}-->
<!--{template space_menu}-->
<!--{/if}-->

<script type="text/javascript" charset="$_SC[charset]" src="source/script_calendar.js"></script>

<div class="entry" style="padding:0 0 10px;">

	<div class="title">
		<h1<!--{if $blog[magiccolor]}--> class="magiccolor$blog[magiccolor]"<!--{/if}-->>$blog[subject]</h1>
		<!--{if $blog['friend']}-->
		<span class="r_option locked gray">{$friendsname[$blog[friend]]}</span>
		<!--{/if}-->
		<!--{if $blog[hot]}--><span class="hot"><em>热</em>$blog[hot]</span><!--{/if}-->
		<!--{if $blog['friend']}-->
		<span class="r_option locked gray">
		<a href="space.php?uid=$space[uid]&do=$do&view=me&friend=$blog[friend]" class="gray">{$friendsname[$value[friend]]}</a>
		</span>
		<!--{/if}-->
		<!--{if $blog[viewnum]}--><span class="gray">已有 $blog[viewnum] 次阅读</span><!--{/if}-->
		&nbsp; <span class="gray"><!--{date('Y-m-d H:i',$blog[dateline],1)}--></span>
		<!--{if $blog[tag]}-->
		&nbsp; <a href="space.php?uid=$blog[uid]&do=tag">标签</a>:&nbsp;
		<!--{loop $blog[tag] $tagid $tagname}-->
		<a href="space.php?uid=$blog[uid]&do=tag&id=$tagid">$tagname</a>&nbsp;
		<!--{/loop}-->
		<!--{/if}-->
	</div>


	<div id="blog_article" class="article <!--{if $blog[magicpaper]}--> magicpaper$blog[magicpaper]<!--{/if}-->">
		<div class="resizeimg">
			<div class="resizeimg2">
			<div class="resizeimg3">
			<div class="resizeimg4">
			<!--{if $_SGLOBAL['ad']['rightside']}-->
			<div style="float: right; padding:5px;"><!--{ad/rightside}--></div>
			<!--{/if}-->
			$blog[message]
			</div>
			</div>
			</div>
		</div>
	</div>
</div>

<div style="padding:0 0 10px;">
	<div style="text-align: right; padding-top:10px; ">
		<a href="cp.php?ac=share&type=blog&id=$blog[blogid]" id="a_share" onclick="ajaxmenu(event, this.id, 1)" class="a_share">分享</a>

		<!--{if $_SGLOBAL[supe_uid] == $blog[uid]}-->
			<!--{if $_SGLOBAL[magic][bgimage]}-->
			<img src="image/magic/bgimage.small.gif" class="magicicon">
				<!--{if $blog[magicpaper]}-->
			<a href="cp.php?ac=magic&op=cancelbgimage&idtype=blogid&id=$blog[blogid]" id="a_magic_bgimage" onclick="ajaxmenu(event,this.id, 1)">取消{$_SGLOBAL[magic][bgimage]}</a>
				<!--{else}-->
			<a href="magic.php?mid=bgimage&idtype=blogid&id=$blog[blogid]" id="a_magic_bgimage" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][bgimage]}</a>	
				<!--{/if}-->
			<!--{/if}-->
			<!--{if $_SGLOBAL[magic][call]}-->
			<img src="image/magic/call.small.gif" class="magicicon">
			<a href="magic.php?mid=call&idtype=blogid&id=$blog[blogid]" id="a_magic_call" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][call]}</a>
			<!--{/if}-->
			<!--{if $_SGLOBAL[magic][updateline]}-->
			<img src="image/magic/updateline.small.gif" class="magicicon">
			<a href="magic.php?mid=updateline&idtype=blogid&id=$blog[blogid]" id="a_magic_updateline" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][updateline]}</a>
			<!--{/if}-->
			<!--{if $_SGLOBAL[magic][downdateline]}-->
			<img src="image/magic/downdateline.small.gif" class="magicicon">
			<a href="magic.php?mid=downdateline&idtype=blogid&id=$blog[blogid]" id="a_magic_downdateline" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][downdateline]}</a>
			<!--{/if}-->
			<!--{if $_SGLOBAL[magic][color]}-->
			<img src="image/magic/color.small.gif" class="magicicon">
				<!--{if $blog[magiccolor]}-->
			<a href="cp.php?ac=magic&op=cancelcolor&idtype=blogid&id=$blog[blogid]" id="a_magic_color" onclick="ajaxmenu(event,this.id)">取消{$_SGLOBAL[magic][color]}</a>
				<!--{else}-->
			<a href="magic.php?mid=color&idtype=blogid&id=$blog[blogid]" id="a_magic_color" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][color]}</a>
				<!--{/if}-->
			<!--{/if}-->
			<!--{if $_SGLOBAL[magic][hot]}-->
			<img src="image/magic/hot.small.gif" class="magicicon">
			<a href="magic.php?mid=hot&idtype=blogid&id=$blog[blogid]" id="a_magic_hot" onclick="ajaxmenu(event,this.id, 1)">{$_SGLOBAL[magic][hot]}</a>
			<!--{/if}-->
			<span class="pipe">|</span>
		<!--{/if}-->

		<!--{if $_SGLOBAL[supe_uid] == $blog[uid] || checkperm('manageblog')}-->
		<a href="cp.php?ac=topic&op=join&id=$blog[blogid]&idtype=blogid" id="a_topicjoin_$blog[blogid]" onclick="ajaxmenu(event, this.id)">凑热闹</a><span class="pipe">|</span>
		<a href="cp.php?ac=blog&blogid=$blog[blogid]&op=edit">编辑</a><span class="pipe">|</span>
		<a href="cp.php?ac=blog&blogid=$blog[blogid]&op=delete" id="blog_delete_$blog[blogid]" onclick="ajaxmenu(event, this.id)">删除</a><span class="pipe">|</span>
		<!--{/if}-->
		<!--{if checkperm('manageblog')}-->
		<a href="cp.php?ac=blog&blogid=$blog[blogid]&op=edithot" id="blog_hot_$blog[blogid]" onclick="ajaxmenu(event, this.id)">热度</a><span class="pipe">|</span>
		<!--{/if}-->
		<a href="cp.php?ac=common&op=report&idtype=blogid&id=$blog[blogid]" id="a_report" onclick="ajaxmenu(event, this.id, 1)">举报</a>
	</div>

</div>

<div id="content">

	<div id="click_div">
		<!--{template space_click}-->
	</div>

	<div class="comments" id="div_main_content">
		<h2>
			<!--{if !$blog[noreply]}-->
			<a href="#quickcommentform_{$id}" class="r_option">发表评论</a>
			<!--{/if}-->
			评论 (<span id="comment_replynum">$blog[replynum]</span> 个评论)</h2>
		<div class="page">$multi</div>
		<div class="comments_list" id="comment">
			<!--{if $cid}-->
			<div class="notice">
				当前只显示与你操作相关的单个评论，<a href="space.php?uid=$blog[uid]&do=blog&id=$blog[blogid]">点击此处查看全部评论</a>
			</div>
			<!--{/if}-->
			<ul id="comment_ul">
			<!--{loop $list $value}-->
				<!--{template space_comment_li}-->
			<!--{/loop}-->
			</ul>
		</div>
		<div class="page">$multi</div>

		<!--{if !$blog[noreply]}-->
		<form id="quickcommentform_{$id}" name="quickcommentform_{$id}" action="cp.php?ac=comment" method="post" class="quickpost">

			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<a href="###" id="comment_face" title="插入表情" onclick="showFace(this.id, 'comment_message');return false;"><img src="image/facelist.gif" align="absmiddle" /></a>
						<!--{if $_SGLOBAL['magic']['doodle']}-->
						<a id="a_magic_doodle" href="magic.php?mid=doodle&showid=comment_doodle&target=comment_message" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />涂鸦板</a>
						<!--{/if}-->
						<br />
						<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5" style="width:500px;"></textarea>
					</td>
				</tr>
				<tr>
					<td>
						<input type="hidden" name="refer" value="space.php?uid=$blog[uid]&do=$do&id=$id" />
						<input type="hidden" name="id" value="$id">
						<input type="hidden" name="idtype" value="blogid">
						<input type="hidden" name="commentsubmit" value="true" />
						<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('quickcommentform_{$id}', 'comment_add')" />
						<div id="__quickcommentform_{$id}"></div>
					</td>
				</tr>
			</table>
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" /></form>
		<br />
		<!--{/if}-->
	</div>

</div>


<div id="sidebar" style="padding-top:20px;">

	<!--{if $topic}-->
	<div class="affiche">
		<img src="image/app/topic.gif" align="absmiddle">
		<strong>凑个热闹</strong>：
		<a href="space.php?do=topic&topicid=$topic[topicid]">$topic[subject]</a>
	</div>
	<!--{/if}-->

	<!--{if $otherlist}-->
	<div class="sidebox">
		<h2 class="title">
			<a href="space.php?uid=$blog[uid]&do=blog&view=me" class="r_option">全部</a>
			作者的其他最新日志
		</h2>
		<ul class="news_list">
			<!--{loop $otherlist $value}-->
			<li style="height:auto;"><a href="space.php?uid=$value[uid]&do=blog&id=$value[blogid]">$value[subject]</a></li>
			<!--{/loop}-->
		</ul>
	</div>
	<!--{/if}-->

	<!--{if $newlist}-->
	<div class="sidebox">
	<h2 class="title">热门日志导读</h2>
		<ul class="news_list">
			<!--{loop $newlist $value}-->
			<li style="height:auto;"><a href="space.php?uid=$value[uid]" style="font-weight:bold;">{$_SN[$value[uid]]}</a>: <a href="space.php?uid=$value[uid]&do=blog&id=$value[blogid]">$value[subject]</a></li>
			<!--{/loop}-->
		</ul>
	</div>
	<!--{/if}-->

	<!--{if $blog['related']}-->
	<!--{loop $blog['related'] $appid $values}-->
	<div class="sidebox">
	<h2 class="title">您可能感兴趣的<!--{if $_SGLOBAL[app][$appid][name]}-->({$_SGLOBAL[app][$appid][name]})<!--{/if}--></h2>
		<ul class="news_list">
			<!--{loop $values['data'] $value}-->
			<li style="height:auto;">$value[html]</li>
			<!--{/loop}-->
		</ul>
	</div>
	<!--{/loop}-->
	<!--{/if}-->
	
</div>


<script type="text/javascript">
<!--
function closeSide2(oo) {
	if($('sidebar').style.display == 'none'){
		$('content').style.cssText = '';
		$('sidebar').style.display = 'block';
		oo.innerHTML = '&raquo; 关闭侧边栏';
	}
	else{
		$('content').style.cssText = 'margin: 0pt; width: 810px;';
		$('sidebar').style.display = 'none';
		oo.innerHTML = '&laquo; 打开侧边栏';
	}
}
function addFriendCall(){
	var el = $('friendinput');
	if(!el || el.value == "")	return;
	var s = '<input type="checkbox" name="fusername[]" value="'+el.value+'" id="'+el.value+'" checked>';
	s += '<label for="'+el.value+'">'+el.value+'</label>';
	s += '<br />';
	$('friends').innerHTML += s;
	el.value = '';
}
resizeImg('blog_article','700');
resizeImg('div_main_content','450');

//彩虹炫
var elems = selector('div[class~=magicflicker]'); 
for(var i=0; i<elems.length; i++){
	magicColor(elems[i]);
}

-->
</script>

<!--{template footer}-->
